FIG. 7 shows an example of a typical sequence program described in the form of a ladder diagram. For controlling mechanical facilities according to a sequence of events, a programmable controller has been employed in the past. A generally adopted method of programming the programmable controller employs a ladder diagram shown in FIG. 7.
Many portions of the ladder diagram often express similar circuits resulting from repetition of a circuit. The similar circuits are different from one another in terms of variables such as contacts or coils. Japanese Unexamined Patent Application Publication No. 4-286002 has disclosed a system for configuring and editing a sequence program consisting of descriptions of similar circuits resulting from repetition of a circuit that is regarded as a repetitive circuit and that has variables thereof alone varied regularly. Some systems including the disclosed system have a copying facility. When a basic unit circuit pattern and a rule on regular variation of a variable are designated, the copying facility autonomously repeats copying of the basic unit, and autonomously varies the variable according to the rule. The repetitive circuit is thus automatically repeated, and the results of automatic production are expressed in the form of a ladder diagram.
Furthermore, Japanese Unexamined Patent Application Publication No. 2-5102 has disclosed a system having the ability to store basic unit circuit patterns and rules on regular variation of variables in the form of a library in a memory or an external storage device, and to select and read a specific circuit pattern from the library in the memory or external storage device if necessary. A ladder diagram is thus automatically produced.
However, according to the foregoing related arts, an operator must intentionally extract or store a basic unit circuit pattern. This is inconvenient. Moreover, when a basic unit circuit pattern registered in advance is used to edit a sequence program, an operator must select the intended basic unit circuit pattern from numerous basic unit circuit patterns stored in the form of a library. As the number of registered basic unit circuit patterns increases, it gets uneasy to judge which of the registered circuit patterns represents a circuit for performing what processing. Moreover, a predetermined auxiliary storage device allocated to a programming system must be entirely searched for the intended basic unit circuit pattern. This is inconvenient for an operator.
Furthermore, even if a plurality of basic unit circuit patterns is registered in advance, the registered patterns are not always employed. The plurality of basic unit circuit patterns compresses the storage capacity of the auxiliary storage device, and some circuit patterns may remain unused. This makes it hard to improve efficiency in program design.
The present invention attempts to solve the foregoing problems. An object of the present invention is to provide a ladder circuit editing system capable of autonomously retrieving analogous ladder diagrams without bothering an operator with extra work, and improving efficiency in designing a ladder diagram without wasting the storage capacity of an auxiliary storage device.